/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.ajz.entity;

import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 模板主体Entity
 * @author cww
 * @version 2019-03-28
 */
@Table(name="ajz_model", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="danger_type", attrName="dangerType", label="隐患类型"),
		@Column(name="base_type", attrName="baseType", label="主体类型"),
		@Column(includeEntity=DataEntity.class),
		@Column(name="model_sort", attrName="modelSort", label="主体类型")
	}, orderBy="a.model_sort"
)
public class AjzModel extends DataEntity<AjzModel> {
	
	private static final long serialVersionUID = 1L;
	private String dangerType;		// 隐患类型
	private String baseType;		// 主体类型
	private Integer modelSort;// 隐患类型排序(升)（加getter、setter）

	public Integer getModelSort() {
		return modelSort;
	}

	public void setModelSort(Integer modelSort) {
		this.modelSort = modelSort;
	}

	public AjzModel() {
		this(null);
	}

	public AjzModel(String id){
		super(id);
	}
	
	@NotBlank(message="隐患类型不能为空")
	@Length(min=0, max=255, message="隐患类型长度不能超过 255 个字符")
	public String getDangerType() {
		return dangerType;
	}

	public void setDangerType(String dangerType) {
		this.dangerType = dangerType;
	}
	
	@NotBlank(message="主体类型不能为空")
	@Length(min=0, max=255, message="主体类型长度不能超过 255 个字符")
	public String getBaseType() {
		return baseType;
	}

	public void setBaseType(String baseType) {
		this.baseType = baseType;
	}
	
}